﻿// Copyright (c) Microsoft Corporation.  All rights reserved.
//
// Module Name:
//
//  MockApplication.cs
//    
// Abstract:
//
//  Implements IApplication interface for unit testing
//  
//--

using System.Diagnostics.CodeAnalysis;
using Microsoft.Office.Interop.Outlook;
using System.Diagnostics;

namespace Microsoft.EnhancedReminders.OutlookAddIn.UnitTests
{
    /// <summary>
    /// Implements IApplication interface for unit testing. This should be used for
    /// testing either default channel modification or rule modification, and not
    /// both in the same test.
    /// </summary>
    public sealed class MockApplication : IOutlookApplication
    {
        IStorageItem _storageItem;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="storageItem"></param>
        public MockApplication(IStorageItem storageItem)
        {
            _storageItem = storageItem;
        }

        #region IApplication Members

        /// <summary>
        /// Implements IApplication.GetDefaultChannelsStorageItem
        /// </summary>
        public IStorageItem GetDefaultChannelsStorageItem()
        {
            return _storageItem;
        }

        /// <summary>
        /// Implements IApplication.GetStorageItem
        /// </summary>
        public IStorageItem GetStorageItem()
        {
            return _storageItem;
        }

        /// <summary>
        /// Implements IApplication.DeleteStorageItem
        /// </summary>
        public void DeleteStorageItem()
        {
        }

        #endregion
    }
}
